<?php

declare(strict_types=1);

namespace ImiApp\ApiServer\Api\Model\Base;

use Imi\Config\Annotation\ConfigValue;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Entity;
use Imi\Model\Annotation\Table;
use ImiApp\ImiServer\AbstractModel as Model;

/**
 * 商品规格 基类.
 *
 * @Entity(camel=false, bean=true, incrUpdate=false)
 * @Table(name=@ConfigValue(name="@app.models.ImiApp\ApiServer\Api\Model\GoodsskuPrice.name", default="fa_goodssku_price"), usePrefix=false, id={"id"}, dbPoolName=@ConfigValue(name="@app.models.ImiApp\ApiServer\Api\Model\GoodsskuPrice.poolName"))
 * @DDL(sql="CREATE TABLE `fa_goodssku_price` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `goods_sku_ids` varchar(255) DEFAULT NULL,
  `goods_id` int(11) NOT NULL COMMENT '所属产品',
  `weigh` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  `image` varchar(255) DEFAULT NULL COMMENT '缩略图',
  `stock` int(11) NOT NULL DEFAULT '0' COMMENT '库存',
  `stock_warning` int(11) DEFAULT NULL COMMENT '库存预警',
  `sales` int(11) NOT NULL DEFAULT '0' COMMENT '已售',
  `sn` varchar(50) DEFAULT NULL COMMENT '货号',
  `weight` int(11) DEFAULT NULL COMMENT '重量(kg)',
  `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '价格',
  `goods_sku_text` varchar(255) DEFAULT NULL COMMENT '中文规格',
  `status` varchar(10) DEFAULT 'up' COMMENT '状态',
  `createtime` int(11) DEFAULT NULL,
  `updatetime` int(11) DEFAULT NULL,
  `deletetime` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商品规格'", decode="")
 *
 * @property int|null $id 
 * @property string|null $goodsSkuIds 
 * @property int|null $goodsId 所属产品
 * @property int|null $weigh 排序
 * @property string|null $image 缩略图
 * @property int|null $stock 库存
 * @property int|null $stockWarning 库存预警
 * @property int|null $sales 已售
 * @property string|null $sn 货号
 * @property int|null $weight 重量(kg)
 * @property string|float|int|null $price 价格
 * @property string|null $goodsSkuText 中文规格
 * @property string|null $status 状态
 * @property int|null $createtime 
 * @property int|null $updatetime 
 * @property int|null $deletetime 
 */
abstract class GoodsskuPriceBase extends Model
{
    /**
     * {@inheritdoc}
     */
    public const PRIMARY_KEY = 'id';

    /**
     * {@inheritdoc}
     */
    public const PRIMARY_KEYS = ["id"];

    /**
     * id.
     * @Column(name="id", type="int", length=11, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $id = NULL;

    /**
     * 获取 id.
     *
     * @return int|null
     */
    public function getId(): ?int
    {
        return $this->id;
    }

    /**
     * 赋值 id.
     * @param int|null $id id
     * @return static
     */
    public function setId($id)
    {
        $this->id = null === $id ? null : (int)$id;
        return $this;
    }

    /**
     * goods_sku_ids.
     * @Column(name="goods_sku_ids", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $goodsSkuIds = NULL;

    /**
     * 获取 goodsSkuIds.
     *
     * @return string|null
     */
    public function getGoodsSkuIds(): ?string
    {
        return $this->goodsSkuIds;
    }

    /**
     * 赋值 goodsSkuIds.
     * @param string|null $goodsSkuIds goods_sku_ids
     * @return static
     */
    public function setGoodsSkuIds($goodsSkuIds)
    {
        $this->goodsSkuIds = null === $goodsSkuIds ? null : (string)$goodsSkuIds;
        return $this;
    }

    /**
     * 所属产品.
     * goods_id
     * @Column(name="goods_id", type="int", length=11, accuracy=0, nullable=false, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $goodsId = NULL;

    /**
     * 获取 goodsId - 所属产品.
     *
     * @return int|null
     */
    public function getGoodsId(): ?int
    {
        return $this->goodsId;
    }

    /**
     * 赋值 goodsId - 所属产品.
     * @param int|null $goodsId goods_id
     * @return static
     */
    public function setGoodsId($goodsId)
    {
        $this->goodsId = null === $goodsId ? null : (int)$goodsId;
        return $this;
    }

    /**
     * 排序.
     * weigh
     * @Column(name="weigh", type="int", length=11, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $weigh = 0;

    /**
     * 获取 weigh - 排序.
     *
     * @return int|null
     */
    public function getWeigh(): ?int
    {
        return $this->weigh;
    }

    /**
     * 赋值 weigh - 排序.
     * @param int|null $weigh weigh
     * @return static
     */
    public function setWeigh($weigh)
    {
        $this->weigh = null === $weigh ? null : (int)$weigh;
        return $this;
    }

    /**
     * 缩略图.
     * image
     * @Column(name="image", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $image = NULL;

    /**
     * 获取 image - 缩略图.
     *
     * @return string|null
     */
    public function getImage(): ?string
    {
        return $this->image;
    }

    /**
     * 赋值 image - 缩略图.
     * @param string|null $image image
     * @return static
     */
    public function setImage($image)
    {
        $this->image = null === $image ? null : (string)$image;
        return $this;
    }

    /**
     * 库存.
     * stock
     * @Column(name="stock", type="int", length=11, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $stock = 0;

    /**
     * 获取 stock - 库存.
     *
     * @return int|null
     */
    public function getStock(): ?int
    {
        return $this->stock;
    }

    /**
     * 赋值 stock - 库存.
     * @param int|null $stock stock
     * @return static
     */
    public function setStock($stock)
    {
        $this->stock = null === $stock ? null : (int)$stock;
        return $this;
    }

    /**
     * 库存预警.
     * stock_warning
     * @Column(name="stock_warning", type="int", length=11, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $stockWarning = NULL;

    /**
     * 获取 stockWarning - 库存预警.
     *
     * @return int|null
     */
    public function getStockWarning(): ?int
    {
        return $this->stockWarning;
    }

    /**
     * 赋值 stockWarning - 库存预警.
     * @param int|null $stockWarning stock_warning
     * @return static
     */
    public function setStockWarning($stockWarning)
    {
        $this->stockWarning = null === $stockWarning ? null : (int)$stockWarning;
        return $this;
    }

    /**
     * 已售.
     * sales
     * @Column(name="sales", type="int", length=11, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $sales = 0;

    /**
     * 获取 sales - 已售.
     *
     * @return int|null
     */
    public function getSales(): ?int
    {
        return $this->sales;
    }

    /**
     * 赋值 sales - 已售.
     * @param int|null $sales sales
     * @return static
     */
    public function setSales($sales)
    {
        $this->sales = null === $sales ? null : (int)$sales;
        return $this;
    }

    /**
     * 货号.
     * sn
     * @Column(name="sn", type="varchar", length=50, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $sn = NULL;

    /**
     * 获取 sn - 货号.
     *
     * @return string|null
     */
    public function getSn(): ?string
    {
        return $this->sn;
    }

    /**
     * 赋值 sn - 货号.
     * @param string|null $sn sn
     * @return static
     */
    public function setSn($sn)
    {
        $this->sn = null === $sn ? null : (string)$sn;
        return $this;
    }

    /**
     * 重量(kg).
     * weight
     * @Column(name="weight", type="int", length=11, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $weight = NULL;

    /**
     * 获取 weight - 重量(kg).
     *
     * @return int|null
     */
    public function getWeight(): ?int
    {
        return $this->weight;
    }

    /**
     * 赋值 weight - 重量(kg).
     * @param int|null $weight weight
     * @return static
     */
    public function setWeight($weight)
    {
        $this->weight = null === $weight ? null : (int)$weight;
        return $this;
    }

    /**
     * 价格.
     * price
     * @Column(name="price", type="decimal", length=10, accuracy=2, nullable=false, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $price = NULL;

    /**
     * 获取 price - 价格.
     *
     * @return string|float|int|null
     */
    public function getPrice()
    {
        return $this->price;
    }

    /**
     * 赋值 price - 价格.
     * @param string|float|int|null $price price
     * @return static
     */
    public function setPrice($price)
    {
        $this->price = null === $price ? null : $price;
        return $this;
    }

    /**
     * 中文规格.
     * goods_sku_text
     * @Column(name="goods_sku_text", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $goodsSkuText = NULL;

    /**
     * 获取 goodsSkuText - 中文规格.
     *
     * @return string|null
     */
    public function getGoodsSkuText(): ?string
    {
        return $this->goodsSkuText;
    }

    /**
     * 赋值 goodsSkuText - 中文规格.
     * @param string|null $goodsSkuText goods_sku_text
     * @return static
     */
    public function setGoodsSkuText($goodsSkuText)
    {
        $this->goodsSkuText = null === $goodsSkuText ? null : (string)$goodsSkuText;
        return $this;
    }

    /**
     * 状态.
     * status
     * @Column(name="status", type="varchar", length=10, accuracy=0, nullable=true, default="up", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $status = 'up';

    /**
     * 获取 status - 状态.
     *
     * @return string|null
     */
    public function getStatus(): ?string
    {
        return $this->status;
    }

    /**
     * 赋值 status - 状态.
     * @param string|null $status status
     * @return static
     */
    public function setStatus($status)
    {
        $this->status = null === $status ? null : (string)$status;
        return $this;
    }

    /**
     * createtime.
     * @Column(name="createtime", type="int", length=11, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $createtime = NULL;

    /**
     * 获取 createtime.
     *
     * @return int|null
     */
    public function getCreatetime(): ?int
    {
        return $this->createtime;
    }

    /**
     * 赋值 createtime.
     * @param int|null $createtime createtime
     * @return static
     */
    public function setCreatetime($createtime)
    {
        $this->createtime = null === $createtime ? null : (int)$createtime;
        return $this;
    }

    /**
     * updatetime.
     * @Column(name="updatetime", type="int", length=11, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $updatetime = NULL;

    /**
     * 获取 updatetime.
     *
     * @return int|null
     */
    public function getUpdatetime(): ?int
    {
        return $this->updatetime;
    }

    /**
     * 赋值 updatetime.
     * @param int|null $updatetime updatetime
     * @return static
     */
    public function setUpdatetime($updatetime)
    {
        $this->updatetime = null === $updatetime ? null : (int)$updatetime;
        return $this;
    }

    /**
     * deletetime.
     * @Column(name="deletetime", type="int", length=11, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $deletetime = NULL;

    /**
     * 获取 deletetime.
     *
     * @return int|null
     */
    public function getDeletetime(): ?int
    {
        return $this->deletetime;
    }

    /**
     * 赋值 deletetime.
     * @param int|null $deletetime deletetime
     * @return static
     */
    public function setDeletetime($deletetime)
    {
        $this->deletetime = null === $deletetime ? null : (int)$deletetime;
        return $this;
    }

}
